//
//  KKNetworkRequest.h
//  XiaoShi
//
//  Created by leo on 2017/6/15.
//  Copyright © 2017年 liaozhenming. All rights reserved.
//

#import <Foundation/Foundation.h>

#define AppServerOfDebugVersion 1   //服务器地址【测试和正式】
#if AppServerOfDebugVersion
//  测试服务器
static NSString* APP_Request_BasicURLString = @"https://messager.postio.me";
#else
//  正式服务器
static NSString* APP_Request_BasicURLString = @"";
#endif


typedef NS_ENUM(NSUInteger, KKNetworkRequestMethodType) {
    KKNetworkRequestMethodType_Get = 0,
    KKNetworkRequestMethodType_Post = 1,
    KKNetworkRequestMethodType_Put = 2,
    KKNetworkRequestMethodType_Delete = 3,
};


@interface KKNetworkRequest : NSObject

@property (nonatomic, strong) NSString *requestHost;
@property (nonatomic, strong) NSString *requestInterfaceName;
@property (nonatomic, strong) NSDictionary *requestParmeters;
@property (nonatomic, assign) KKNetworkRequestMethodType methodType;

@property (nonatomic, readonly) NSString *requestURL;
@property (nonatomic, readonly) NSData *requestPostData;
@property (nonatomic, readonly) NSString *requestParmeterString;

@property (nonatomic, strong) NSString *responseClassString;    /**<返回的数据对象*/

+ (KKNetworkRequest *)requestWithHost:(NSString*)host interfaceName:(NSString*)interfaceName parmeters:(NSDictionary*)parmeters;

+ (KKNetworkRequest *)requestWithHost:(NSString*)host interfaceName:(NSString*)interfaceName parmeters:(NSDictionary*)parmeters methodType:(KKNetworkRequestMethodType)methodType;

- (instancetype)initWithHost:(NSString*)host interfaceName:(NSString*)interfaceName parmeters:(NSDictionary*)parmeters methodType:(KKNetworkRequestMethodType)methodType;

@end
